﻿@model ZhongheCms.Models.GswTblJobInfo
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var objName = "";
    var objName1 = "";
    string s0 = "selected";
    string s1 = "selected";
    string s2 = "selected";
    string s3 = "selected";
    
}
@section css{

    <link rel="stylesheet" href="/kindeditor/themes/default/default.css" />
   
}
<div class="row">
    <div class="col-xs-12 col-sm-12 widget-container-col">
        @using (Html.BeginForm("PayNotice", "JobInfo", new { id = Model.Id, ViewBag.m, ViewBag.f, ViewBag.p, ViewBag.fid, ViewBag.sdate, ViewBag.edate, ViewBag.jname,ViewBag.pageIndex }, FormMethod.Post,
            new { name = "myForm", id = "myForm", @class = "form-horizontal", role = "form" }))
        {
            <div class="widget-box">
                <div class="widget-header">
                    <h5 class="widget-title">@ViewBag.f  @if (!string.IsNullOrEmpty(ViewBag.p))
                                                         {
                        <span>(@ViewBag.p)</span>
                                                         }</h5>

                    <div class="widget-toolbar">
                    </div>
                </div>

                <div class="widget-body">


                    <div class="widget-main">

                        <div class="form-group">
                            <table id="sample-table-1" class="table table-bordered table-hover">
                                <tbody>
                                    <tr>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">发布日期
                                        </td>
                                        <td>

                                            @Model.PubDate.ToShortDateString()

                                        </td>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">截止日期
                                        </td>
                                        <td>

                                            @Model.EndDate.ToShortDateString()

                                        </td>

                                    </tr>


                                    <tr>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">职位编号
                                        </td>
                                        <td>

                                            @Model.JobNo

                                        </td>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">职位名称
                                        </td>
                                        <td >
                                            @Model.JobTitle
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">职位数量
                                        </td>
                                        <td>

                                            @Model.JobNum

                                        </td>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">录用数量
                                        </td>
                                        <td >
                                            @Model.AcceptedNum

                                        </td>
                                    </tr>
                                     <tr>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">发布日期
                                        </td>
                                        <td colspan="3">

                                            <input type="text" id="PayNoticeDate" name="PayNoticeDate" placeholder=""  class="col-xs-8 col-sm-4"  value="@Model.PayNoticeDate.GetValueOrDefault().ToShortDateString()" />

                                        </td>
                                      

                                    </tr>
                                      <tr>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">通知内容
                                        </td>
                                        <td colspan="3">
                                            <textarea id="PayNotice" name="PayNotice" class="form-control" style="height: 200px">@Model.PayNotice</textarea>

                                        </td>
                                    </tr>
                                
                                    <tr>
                                        <td colspan="4">
                                                @if (Model.JobWorkAlls.Count > 0)
                                        {
                                           

                                                 <table class="table table-bordered table-hover">
                                                    <thead>
                                                        <tr>
                                                           
                                                            <th>会员类别
                                                            </th>
                                                            <th>会员姓名
                                                            </th>
                                                             
                                                            <th>联系电话
                                                            </th>

                                                            
                                                            <th colspan="2">工作评价
                                                            </th>
                                                            
                                                            
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        @foreach (var item in Model.JobWorkAlls)
                                                        {
                                                            objName = "s" + item.Id;
                                                            objName1 = "t" + item.Id;
                                                            s1 = "selected";
                                                            s2 = "selected";
                                                            s3 = "selected";
                                                            s0 = "selected";
                                                            if (item.WorkFlag == 1)
                                                            {
                                                                s2 = "";
                                                                s3 = "";
                                                                s1 = "";
                                                            }
                                                            if (item.WorkFlag == 2)
                                                            {
                                                                s2 = "";
                                                                s3 = "";
                                                                s0 = "";
                                                            }
                                                            if (item.WorkFlag == 3)
                                                            {
                                                                s1 = "";
                                                                s3 = "";
                                                                s0 = "";
                                                            }
                                                            if (item.WorkFlag == 4)
                                                            {
                                                                s1 = "";
                                                                s2 = "";
                                                                s0 = "";
                                                            }
                                                            <tr>
                                                               
                                                                <td>
                                                                    @item.MemberType

                                                                </td>
                                                                <td>
                                                                    @item.MemberName
                                                                </td>
                                                                <td>
                                                                    @item.MemberTel
                                                                </td>
                                                               
                                                                
                                                                <td>
                                                                   
                                                                    @item.WorkResult
                                                                    <select id="@objName" name="@objName">
                                                                        <option value="0" >待评价</option>
                                                                        <option value="1" @s0>未参加</option>
                                                                        <option value="2" @s1>好评</option>
                                                                        <option value="3" @s2>中评</option>
                                                                        <option value="4" @s3>差评</option>
                                                                    </select>
                                                                </td>
                                                                <td>
                                                                   
                                                                    <input type="text" id="@objName1" name="@objName1"  style="width: 95%"  value="@item.WorkResult" />
                                                                </td>
                                                            </tr>
                                       
                                                        }
                                                    </tbody>
                                                </table>
                                       
                                        }
                                        </td>
                                    </tr>

                                </tbody>
                            </table>
                        </div>


                        @if (ViewBag.scode == "1")
                        {
                            <div class="hr hr-2 dotted"></div>
                            <div class="alert alert-success">
                                <button type="button" class="close" data-dismiss="alert">
                                    <i class="icon-remove"></i>
                                </button>

                                <strong>
                                    <i class="icon-ok"></i>
                                    提示信息
                                </strong>

                                信息保存成功!
																
                            </div>
                        }
                        @if (ViewBag.scode == "0")
                        {
                            <div class="hr hr-2 dotted"></div>
                            <div class="alert alert-danger">
                                <button type="button" class="close" data-dismiss="alert">
                                    <i class="icon-remove"></i>
                                </button>

                                <strong>
                                    <i class="icon-remove"></i>
                                    错误提示
                                </strong>

                                @Html.ValidationSummary(true)

                            </div>

                        }
                        <div class="clearfix form-actions">
                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn btn-info" type="submit">
                                    &nbsp;&nbsp;<i class="ace-icon fa fa-check bigger-110"></i>
                                    保存&nbsp;&nbsp;
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="button" onclick="funBack()">
                                    &nbsp;&nbsp;<i class="ace-icon fa fa-undo bigger-110"></i>
                                    返回&nbsp;&nbsp;
                                </button>
                            </div>
                        </div>




                    </div>



                </div>

            </div>
        }

    </div>


</div>
@section js{
    <script src="/assets/js/jquery.validate.min.js"></script>
    <script src="/assets/js/jquery.validate.unobtrusive.js"></script>
    <script src="/assets/js/jquery.validate.unobtrusive.bootstrap.js"></script>
    <script src="/assets/js/select2.js"></script>
    <script src="/assets/js/select2_locale_zh-CN.js"></script>
    <script charset="utf-8" src="/kindeditor/kindeditor-min.js" type="text/javascript"></script>
    <script charset="utf-8" src="/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
    <script src="/Assets/webuploader/webuploader.js" type="text/javascript"></script>
     <script src="/assets/js/date-time/bootstrap-datepicker.min.js"></script>
    <script src="/assets/js/date-time/bootstrap-datepicker.zh-CN.js" ></script>
    <script type="text/javascript">
        KindEditor.ready(function (K) {
            var editor1 = K.create('#PayNotice', {
                cssPath: '/kindeditor/plugins/code/prettify.css',
                uploadJson: '/kindeditor/upload_json.ashx',
                fileManagerJson: '/kindeditor/file_manager_json.ashx'


            });


        });


        jQuery(function ($) {
           
            $('#PayNoticeDate').datepicker({
                autoclose: true,
                todayHighlight: true,
                language: "zh-CN"
            });
   
          
        });
         function funBack() {
             document.location = "/JobInfo/PayList/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&sdate=@ViewBag.sdate&edate=@ViewBag.edate&jname=@ViewBag.jname&pageIndex=@ViewBag.pageIndex";
        }
    </script>
}
